import React from 'react';
import {BrowserRouter, Route, Switch, Redirect} from 'react-router-dom';


function A() {
    return <h1>组件A</h1>
}

function B() {
    return <h1>组件B</h1>
}

function C() {
    return <h1>组件C</h1>
}

function LinkInfo(props) {
    return (
        <div>
            <BrowserRouter>
                <Switch>
                    <Route path="/a" component={A} exact={true} sensitive={true}/>
                    <Route path="/b" component={B} exact={true} sensitive={true}/>
                    <Route path="/c" component={C} exact={true} sensitive={true}/>
                    {/*<Redirect to={'/a'}/>*/}
                    <Redirect to={'/c'} from={'/s'} push={true} exact={true} sensitive={true} strict={true}/>
                </Switch>
            </BrowserRouter>
        </div>
    );
}

export default LinkInfo;